package com.jianguozh.difs.framework.base;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * IdEntity 基类
 *
 * @author hanrs
 * @email 4076130@qq.com
 * @since 2022/3/17 15:44
 */
@Data
public class IdEntity<T extends Model<T>> extends Model<T> {

    /**
     * 主键
     */
    @TableId
    protected String id;

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
